package ywpt.service.contract;

import java.util.List;

import org.hibernate.criterion.DetachedCriteria;

import ywpt.model.ContractInfo;
import ywpt.model.ContractType;
import ywpt.model.Department;

public interface ContractService {

	public abstract ContractInfo getContractInfoById(Long id);

	public abstract int getContractInfoCountByCriteria(DetachedCriteria query);

	public abstract int getContractInfoCountByCode(String contractCode);
	
	public abstract List<ContractInfo> getContractInfos(DetachedCriteria query, int pageSize, int startIndex);

	public abstract List<ContractInfo> getContractInfos();
	
	public abstract void saveContractInfo(ContractInfo contractInfo,
			Long departId, Long typeId, Long clientId,Long proId);

	public abstract void updateContractInfo(ContractInfo contractInfo,
			Long departId, Long typeId, Long clientId,Long proId);
	
	public abstract void update(ContractInfo contractInfo);

	public abstract List<Department> getDepartments();

	public abstract List<ContractType> getContractTypes();

	public abstract String creatContractCode();
	
	public abstract List<ContractInfo> getContractInfos(DetachedCriteria query);

	public abstract void removeContractInfo(Long id);

	public abstract boolean checkContractCode(String contractCode);

}
